/*===========================================
	Paradigm Engine for Twilight Hack
	Build 1.0
	Object modification definitions
	
	(C)2008 Vicious1988 - Syndicate Development
===========================================*/

#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <gccore.h>
#include <ogcsys.h>
#include "c_primitives.h"

extern primitive cubes[];

#define DEFAULT_FIFO_SIZE	(256*1024)

void setPosition (int target,float x1, float y1, float z1)
{
	cubes[target].x=x1;
	cubes[target].y=y1;
	cubes[target].z=z1;
}

// setRelativePosition() works improperly, affects all existing primitives
void setRelativePosition (int target, int relative, float x1, float y1, float z1)
{
	cubes[target].x=cubes[relative].x;
	cubes[target].y=cubes[relative].y;
	cubes[target].z=cubes[relative].z;
	cubes[target].xr=x1;
	cubes[target].yr=y1;
	cubes[target].zr=z1;
}

void setRotation (int target,float x1, float y1, float z1)
{
	cubes[target].rotx=x1;
	cubes[target].roty=y1;
	cubes[target].rotz=z1;
}

void setScale (int target,float x1, float y1, float z1)
{
	cubes[target].scalex=x1;
	cubes[target].scaley=y1;
	cubes[target].scalez=z1;
}

void setTexture (int target,int texname)
{
	cubes[target].tex=texname;
}

void isTextured (int target,int textured)
{
	cubes[target].usetex=textured;
}
